from models import db
from models.index import User
from . import index_blu
from flask import render_template, session


@index_blu.route("/")
def index():
    user_id = session.get("user_id")
    nick_name = session.get("nick_name", "")
    user = db.session.query(User).filter(User.id == user_id).first()
    return render_template("index/index.html", user=user, nick_name=nick_name)


@index_blu.route("/index1.html")
def index1():
    user_id = session.get("user_id")
    nick_name = session.get("nick_name", "")
    user = db.session.query(User).filter(User.id == user_id).first()
    return render_template("index/index1.html", user=user, nick_name=nick_name)


@index_blu.route("/index2.html")
def index2():
    user_id = session.get("user_id")
    nick_name = session.get("nick_name", "")
    user = db.session.query(User).filter(User.id == user_id).first()
    return render_template("index/index2.html", user=user, nick_name=nick_name)


@index_blu.route("/index3.html")
def index3():
    user_id = session.get("user_id")
    nick_name = session.get("nick_name", "")
    user = db.session.query(User).filter(User.id == user_id).first()
    return render_template("index/index3.html", user=user, nick_name=nick_name)


@index_blu.route("/index4.html")
def index4():
    user_id = session.get("user_id")
    nick_name = session.get("nick_name", "")
    user = db.session.query(User).filter(User.id == user_id).first()
    return render_template("index/index4.html", user=user, nick_name=nick_name)


@index_blu.route("/index5.html")
def index5():
    user_id = session.get("user_id")
    nick_name = session.get("nick_name", "")
    user = db.session.query(User).filter(User.id == user_id).first()
    return render_template("index/index5.html", user=user, nick_name=nick_name)


@index_blu.route("/list_1.html")
def list_1():
    user_id = session.get("user_id")
    nick_name = session.get("nick_name", "")
    user = db.session.query(User).filter(User.id == user_id).first()
    return render_template("index/list_1.html", user=user, nick_name=nick_name)


@index_blu.route("/list_11.html")
def list_11():
    user_id = session.get("user_id")
    nick_name = session.get("nick_name", "")
    user = db.session.query(User).filter(User.id == user_id).first()
    return render_template("index/list_11.html", user=user, nick_name=nick_name)


@index_blu.route("/list_12.html")
def list_12():
    user_id = session.get("user_id")
    nick_name = session.get("nick_name", "")
    user = db.session.query(User).filter(User.id == user_id).first()
    return render_template("index/list_12.html", user=user, nick_name=nick_name)


@index_blu.route("/ist_13.html")
def list_13():
    user_id = session.get("user_id")
    nick_name = session.get("nick_name", "")
    user = db.session.query(User).filter(User.id == user_id).first()
    return render_template("index/list_13.html", user=user, nick_name=nick_name)
